<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--在prop后面添加.sync修饰符，在子组件中emit update:prop-->
  <child :money.sync="money"></child>
</div>


<script src="../node_modules/vue/dist/vue.js"></script>
<script>
  let child = {
    data() {
      return {}
    },
    props: ['money'],
    template: `<div>儿子：{{money}} <button @click="fn">多要钱</button></div>`,
    methods: {
      fn() {
        this.$emit('update:money', 8888)
      }
    }
  };

  let vm = new Vue({
    el: '#app',
    data: {
      money: 250
    },
    components: {
      child
    }
  })
</script>
</body>
</html>